/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de La Frontera
 * License Type: Academic
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TipoConsumoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression tipocon_ID;
	public final StringExpression tipo;
	public final ShortExpression monto_fijo;
	public final ShortExpression monto_variable;
	
	public TipoConsumoDetachedCriteria() {
		super(orm.TipoConsumo.class, orm.TipoConsumoCriteria.class);
		tipocon_ID = new IntegerExpression("tipocon_ID", this.getDetachedCriteria());
		tipo = new StringExpression("tipo", this.getDetachedCriteria());
		monto_fijo = new ShortExpression("monto_fijo", this.getDetachedCriteria());
		monto_variable = new ShortExpression("monto_variable", this.getDetachedCriteria());
	}
	
	public TipoConsumoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.TipoConsumoCriteria.class);
		tipocon_ID = new IntegerExpression("tipocon_ID", this.getDetachedCriteria());
		tipo = new StringExpression("tipo", this.getDetachedCriteria());
		monto_fijo = new ShortExpression("monto_fijo", this.getDetachedCriteria());
		monto_variable = new ShortExpression("monto_variable", this.getDetachedCriteria());
	}
	
	public ConsumoDetachedCriteria createConsumoCriteria() {
		return new ConsumoDetachedCriteria(createCriteria("ORM_Consumo"));
	}
	
	public TipoConsumo uniqueTipoConsumo(PersistentSession session) {
		return (TipoConsumo) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public TipoConsumo[] listTipoConsumo(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (TipoConsumo[]) list.toArray(new TipoConsumo[list.size()]);
	}
}

